import java.util.Scanner;

// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class code51 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int[][] arr = new int[n+1][n+1];

        for(int i=1;i<=n;i++) {
            for(int j=1;j<=i;j++) {
                if(j==1 || j==i) {
                    arr[i][j] = 1;
                    System.out.printf("%5d",arr[i][j]);
                } else {
                    arr[i][j] = arr[i-1][j-1] + arr[i-1][j];
                    System.out.printf("%5d",arr[i][j]);
                }
            }
            System.out.println();
        }

    }
}